<?php
use  yii\helpers\Url;
use  yii\helpers\Html;
$menu    = \backend\modules\models\setting\Menu::findOne(['name'=>'网站首页']);
$content = $menu->getLimitContent(4);
?>
<div class="container-lg mt-4">
    <div class="card mb-3 shadow-sm">
        <div class="row no-gutters">
            <div class="col-md-3 flex-column px-3 guide-left bd-highlight d-flex justify-content-center">
                <div>今日导读</div>
                <div>Today's Guide</div>
            </div>
            <div class="col-md-9">
                <div class="card-body row today-wrap">
                    <?php if ($content) {?>
                        <?php foreach ($content as $one => $first): ?>
                            <a class="col-md-6 d-flex a-href" href="<?= Url::to(['site/content','content_id'=>$first->id])?>" data-id="<?= Html::encode($one)?>">
                                <div class="guide-title"></div>
                                <div class="text-truncate text-nowrap"><?= Html::encode($first->title)?></div>
                                <div class="text-nowrap"><?= Html::encode($first->create_time)?></div>
                            </a>
                        <?php endforeach ?>
                    <?php }?>
                    
                </div>
            </div>
        </div>
    </div>
</div>